package com.srwl.mytx.activity;

import android.os.Bundle;
import android.view.View;

import com.srwl.mytx.R;
import com.srwl.mytx.domain.User;
import com.srwl.mytx.fragment.TransferFragment;
import com.srwl.mytx.widget.RPTitleBar;
import com.srwl.redpacketui.ui.fragment.SendPacketBaseFragment;

/**
 * Created by max on 16/2/26
 */
public class RPTransferActivity extends BaseActivity   {


    private RPTitleBar mTitleBar;


    @Override
    protected void onCreate(Bundle arg0) {
        super.onCreate(arg0);
        setContentView(R.layout.rp_activity_transfer);
        initViewsAndEvents();
    }


    protected void initViewsAndEvents( ) {
        User targetUser = getIntent().getParcelableExtra(SendPacketBaseFragment.ARGS_TARGET_USER);
        getSupportFragmentManager().beginTransaction().add(R.id.transfer_fragment_container, TransferFragment.newInstance(targetUser)).commit();

        mTitleBar =  findViewById(R.id.transfer_title_bar);

        mTitleBar.setLeftLayoutClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                hideSoftKeyboard();
                finish();
            }
        });

        mTitleBar.setRightImageLayoutVisibility(View.GONE);

    }

}
